/**
 * 功能描述
 */

define(function(require, exports, module) {
	var Form = require("form");
	var store = require("store");
	var activeUser = store.get("user");
	
	var instance = {
		initComponent : function(params, widget) {
			
			var form = new Form({
				parentNode : ".J-form",
				show : false,
				model : {
					id : "form",
					defaultButton : false,
					layout : "3_1",
					items : [{
						name:"pkUser",
						type:"hidden",
						defaultValue:activeUser.pkUser
					},{
						name:"allianceSettlement.operator.pkUser",
						type:"hidden",
						defaultValue:activeUser.pkUser
					},{
						name : "allianceConfirm.pkAllianceConfirm",
						type : "hidden"
					},{
						name : "allianceConfirm.groupReserve.planItemGroup.pkPlanItemGroup",
						type : "hidden"
					},{
						name : "allianceSettlement.pkAllianceSettlement",
						type : "hidden"
					},{
						name : "allianceSettlement.version",
						type : "hidden"
					},{
						name : "allianceConfirm.groupReserve.planItemGroup.planItem.destination.name",
						type : "text",
						label : "目的地",
						readonly : true,
					}, {
						name : "allianceConfirm.groupReserve.checkInDate",
						type : "date",
						label : "入住日期",
						mode : "YYYY-MM-DD",
						readonly : true,
					}, {
						name : "allianceConfirm.groupReserve.checkOutDate",
						type : "date",
						label : "退房日期",
						mode : "YYYY-MM-DD",
						readonly : true,
					}, {
						name : "signUpNumber",
						type : "text",
						label : "报名人数",
						readonly : true,
					}, {
						name : "allianceSettlement.settlementDate",
						type : "date",
						label : "结算日期",
						mode : "YYYY-MM-DD",
						defaultValue:moment().format("YYYY-MM-DD"),
						readonly : true,
					}, {
						name : "allianceSettlement.operator.name",
						type : "text",
						label : "经办人",
						readonly : true,
						defaultValue:activeUser.name
					}]
				}
			});
			widget.set("form",form);
		}
	};
	module.exports = instance;
});
